<?php

class Product extends E_ARB {

	//this prolly just over rights vars.
	//protected $has_many = array('on_delete_remove' => 'comments', 'on_delete_remove' => 'productimages', 'orderdetails');

	protected $has_many = array('comments' => 'on_delete_remove', 'productimages' => 'on_delete_remove', 'orderdetails');
	protected $has_and_belongs_to_many = array('playgroundequipments');
	protected $has_one = array('defaultimage');

	function before_destroy() {
		//halt if product is in somones invoice
		//if so then on destroy set active flag to false
	}

	function get_dimensions() {	return ($this->length . '\' x ' . $this->width . '\' x ' . $this->height . '\'(H)'); }

}

?>